package utils

import (
	"errors"
	"strconv"

	"github.com/google/uuid"
)

// GenerateUUID 生成 UUID
func GenerateUUID() string {
	u, _ := uuid.NewRandom()
	return u.String()
}

func StringToUint64(s string) (uint64, error) {
	if s == "" {
		return 0, errors.New("参数不能为空")
	}
	return strconv.ParseUint(s, 10, 64)
}
